<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="try">
        <span v-on:click='fn'>click</span>
    </div>
    <script src="js/vue.js"></script>
    <script>
        let vm = new Vue()
        vm.$on('dataChange',()=>{
            console.log('dataChange')
        })
        vm.$on('dataChange',()=>{
            console.log('dataChange1')
        })
        vm.$emit('dataChange')

        // --------linshi-----
        let vm1=new Vue({
            el:'#try',
            methods: {
                fn(){
                    console.log(1)
                }
            },
        })
    </script>
</body>
</html>